<?php
namespace app\api\controller;

use app\admin\model\ActiveCases;
use think\Controller;
use think\Request;

class ActiveCase extends Controller
{
    public function activeCaseDetail(Request $request){
        $res = [];
        $id = $request->post('id');
        if($id == null){
            $res['status'] = 400;
            echo json_encode($res);die;
        }
        $activeCases = new ActiveCases();
        $where['id'] = $id;
        $rs = $activeCases->getOne($where);
        if($rs == null){
            $res['data']['code'] = 0;
            $res['data']['msg'] = '获取失败';
        }else{
            $res['data']['code'] = 1;
            $res['data']['msg'] = '获取成功';
            $res['data']['list'] = $rs;
        }
        $res['status'] = 200;
        echo json_encode($res);
    }
}
